<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div id="sjfe">157889</div>
<div >fehal</div>
<div >feiuioahgfgf</div>



用户名:<input type="text" id="hehe"><br>


<input type="checkbox" name="as" id="wuhu">游泳
<input type="checkbox" name="as">游戏
<input type="checkbox" name="as">打球

<script>

    let elemID = document.getElementById("sjfe");
    elemID.innerHTML="牛马拿命来";

    let e2 = document.getElementById("hehe");
    e2.value="我有值"

    let e3 = document.getElementsByName("as");
    for (let i = 0; i < e3.length; i++) {
        e3[i].checked=true;
        }

/*
    let e4 = document.getElementById("wuhu");
    e4.checked=true;
*/






</script>






<!-- alert("三秒后跳转B站");

        setTimeout(function () {
            window.location.href="https://www.bilibili.com/";
        },3000)
   let elementById = document.getElementById("sjfe");*/
    //alert(elementById.innerHTML)


/*    let e = document.getElementsByTagName("div");
for (let i = 0; i < e.length; i++) {
    alert(e[i]);*/
}-->



</body>
</html>